package com.leetcode.LC;

public class LC674 {
    public int findLengthOfLCIS(int[] nums) {
        if (nums.length == 0) {
            return 0;
        } else if (nums.length < 2) {
            return 1;
        }
        int max = 0, count = 1;
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i] < nums[i + 1]) {
                count++;
            } else {
                max = Math.max(max, count);
                count = 1;
            }
        }
        max = Math.max(max, count);
        return max;
    }

    public static void main(String[] args) {
        System.out.println(new LC674().findLengthOfLCIS(new int[]{1, 3, 5, 4, 7}));
    }
}
